<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/11/30
 * Time: 18:21
 */
require_once(dirname(__FILE__) . '/../../inc/config.inc.php');
IsModelPriv('goodsorder');

$page = isset($_GET['page']) ? intval($_GET['page']) : 0 ;
$size = isset($_GET['limit']) ? intval($_GET['limit']) : 0 ;
$start_num = ($page - 1) * $size;


$sql="SELECT t.*,c.classname  FROM `#@__task`  as  t  left join `#@__tasktype` as c on c.id=t.classid  where t.`is_delete`=0  ";
$dosql->Execute($sql,8);
$count=$dosql->GetTotalRow(8);
$sql.=" order by id desc  LIMIT $start_num, $size ";
$dosql->Execute($sql);
while ($row = $dosql->GetArray()) {
    $row['picurl_url'] = "/".$row['picurl'];
    $row_arr['data'][] = $row;
}
if (empty($row_arr['data'])) {
    $row_arr['data'][] = [];
}
$row_arr['code'] = 0;
$row_arr['msg'] = "";
$row_arr['count'] = $count;
echo json_encode($row_arr);